package com.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.enums.UserStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("my_database.user_info")
public class User {

    @TableId(value = "user_id",type = IdType.AUTO)
    private Integer userId;

    @TableField("user_name") //将数据库中的user_name对应起来
    private String userName;

//    @TableField(select = false) // 表明该字段不出现在查询结果中
    private Integer userAge;

    private UserStatus userStatus;

    @TableField(exist = false) // 表明该字段在数据库不存在
    private String preference;
}
